-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always wrap contents of zcml-additional with a <configure /> node. #13
Conversation
+1! |
@esteele any objections to me merging this one? |
Any implications for existing installations? |
@esteele I can't see any. |
👍 would be great to have this fix! |
The buildout:zcml-additional-fragments variable helps wrapping the instanceX:zcml-additional option with a root configuration node, which allows to append to the buildout:zcml-additional-fragments any ZCML which will then properly set up. For more information regarding the source of the problem take a look at: plone/plone.recipe.zope2instance#13
The buildout:zcml-additional-fragments variable helps wrapping the instanceX:zcml-additional option with a root configuration node, which allows to append to the buildout:zcml-additional-fragments any ZCML which will then properly set up. For more information regarding the source of the problem take a look at: plone/plone.recipe.zope2instance#13
I just set up Travis CI for this package. Please update your branch to include .travis.yml so we can make sure the tests still pass. |
This makes it possible to use += assignments with zcml-additional.
@davisagli great, thanks! Rebased my branch onto master. |
…figure Always wrap contents of zcml-additional with a <configure /> node.
makes sure we're using a version of the recipe that supports using "zcml-additional += ..." assignments (see plone/plone.recipe.zope2instance#13)
This makes it possible to use
+=
assignments withzcml-additional
.Currently, the contents of
zcml-additional
are dumped as-is in999-additional-overrides.zcml
. This means that you can't usezcml-additional +=
assignments to add to an instance's additional ZCML from multiple places, because you will end up with a999-additional-overrides.zcml
that contains multiple top level nodes (which isn't valid XML).In this PR I wrap the contents of
zcml-additional
in<configure />
node (including the Zope XMLNS) before writing them to the file.This is done unconditionally, so even if
zcml-additional
only contains one element, it will be wrapped. However, because<configure />
directives can be nested to arbitrary depths (seezope.configuration.zopeconfigure
, this should not be a problem, and the simplicity of the change outweighs the possible redundancy in my opinion.